import request from '@/utils/request'

// 微信扫码登录
export function wxLogin(data) {
  return request({
    url: '/customer/openCustomer/wxLogin',
    method: 'post',
    data
  })
}

// 账号密码登录
export function accountLogin(data) {
  return request({
    url: '/customer/openCustomer/login',
    method: 'post',
    data
  })
}

// 用户注册
export function register(data) {
  return request({
    url: '/customer/openCustomer/register',
    method: 'post',
    data
  })
}

// 发送短信
export function sendSms(data) {
  return request({
    url: '/platform/smsApi/phoneCode',
    method: 'get',
    params :data
  })
}

// 获取用户基本资料
export function getCustomerInfo(data) {
  return request({
    url: '/customer/openCustomer/getCustomerInfo',
    method: 'get',
    params :data
  })
}

// 修改用户资料
export function updateCustomerInfo(data) {
  return request({
    url: '/customer/openCustomer/editCustomerInfo',
    method: 'post',
    data
  })
}

// 忘记密码
export function forgetPassword(data) {
  return request({
    url: '/customer/openCustomer/resetPassword',
    method: 'post',
    data
  })
}

